<!--日期：2011-9-17-->
<!--用户：刘永杰    -->
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page
	import="java.sql.*,com.lyjilu.util.*,java.util.*,java.io.*,org.apache.commons.fileupload.FileItem"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
	String sql = "select f.id,f.name,f.type,f.size,f.cre_time,f.diskpath from file f";
	Connection conn = null;
	Map<String, Object> list = null;
	try {
		conn = DaoUtil.getConn();
		list = DaoUtil.find(conn, sql);
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		DaoUtil.closeDao(null, null, conn);
	}
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
#table {
	border-collapse: collapse;
	border: 0px;
}

#table td {
	border: 1px solid red;
}

* {
	font-size: 13px;
}
</style>
</head>
<body>
	<a href="index.jsp">上传</a>
	<table id="table">
		<%
			List<String> metaName = (List<String>) list
					.get(DaoUtil.METADATANAME);
			List<Map<String, Object>> dblist = (List<Map<String, Object>>) list
					.get(DaoUtil.DBDATANAME);

			out.println("<tr>");
			for (int i = 0; i < metaName.size(); i++) {
				String name = metaName.get(i);
				out.println("<td>");
				out.println(name);
				out.println("</td>");
			}
			out.println("<td>");
			out.println("download");
			out.println("</td>");
			out.println("</tr>");
			for (int i = 0; i < dblist.size(); i++) {
				Map<String, Object> map = dblist.get(i);
				Set<String> keySet = map.keySet();
				out.println("<tr>");
				for (int j = 0; j < metaName.size(); j++) {
					String name = metaName.get(j);
					out.println("<td>");
					out.println(map.get(name));
					out.println("</td>");
				}
				out.println("<td>");
				out.println("<a href='DownloadSvt?id=" + map.get("id")
						+ "'>download</a>");
				out.println("</td>");
				out.println("</tr>");
			}
		%>
	</table>
</body>
</html>